package com.zhonghe.active4j.filesys.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhonghe.active4j.filesys.dao.FileHandlerDao;
import com.zhonghe.active4j.filesys.entity.FileHandlerEntity;
import com.zhonghe.active4j.filesys.service.FileHandlerService;

@Service("fileHandlerLineService")
@Transactional
public class FileHandlerServiceImpl  extends ServiceImpl<FileHandlerDao, FileHandlerEntity> implements  FileHandlerService{

	@Override
	public void saveUser(FileHandlerEntity sysConfigEntity, String roleIds) {
		super.save(sysConfigEntity);
	}

	@Override
	public void saveOrUpdateUser(FileHandlerEntity sysConfigEntity, String roleIds) {
		super.saveOrUpdate(sysConfigEntity);
	}

	@Override
	public void delete(FileHandlerEntity sysConfigEntity) {
		//删除用户
		super.removeById(sysConfigEntity.getId());
	}

	@Override
	public void batchDels(String ids) {
		//“,”分割成数组
		String[] strIds = ids.split(",");
		if(null != strIds && strIds.length > 0) {
			for(String id : strIds) {
				//删除
				removeById(id);
			}
		}
	}

}
